<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--在控制台中输出宽度100px-->
		
		<!--js无法读取样式表中属性的值 ，只能把样式写成行内样式-->
		<style type="text/css">
			div{
				/*width: 100px;*/
				height: 100px;
				background: yellowgreen;
				margin-top: 10px;
			}
		</style>
		<script type="text/javascript">
			function fun(){
				var w= document.getElementById("box").style.width;
				console.log(w);
			}
		</script>
	</head>
	<body>
		<input type="button"value="点我" onclick="fun()"/>
		<div id="box" style="width: 100px;"></div>
	</body>
</html>
